package net.xiangcaowuyu.shiro.mapper;

import net.xiangcaowuyu.shiro.entity.ShiroPermission;
import org.apache.ibatis.annotations.Mapper;

import java.util.Set;

/**
 * @author laughing
 * @date 2020/10/11
 * @site https://www.lisen.org
 */
@Mapper
public interface ShiroPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(ShiroPermission record);

    int insertSelective(ShiroPermission record);

    ShiroPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShiroPermission record);

    int updateByPrimaryKey(ShiroPermission record);

    /**
     * 获取角色对应权限
     * @param roleId 角色Id
     * @return 权限集合
     */
    Set<ShiroPermission> findByRoleId(long roleId);
}